package eg.ci.mvn.service.api.model.dto;


import eg.ci.mvn.service.api.constant.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;


import static eg.ci.mvn.service.api.model.param.ParkingCardParam.*;
import static eg.ci.mvn.service.api.model.param.ParkingMemberParam.*;

@SuperBuilder
@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "ParkingCar 实体")
public class ParkingCar {

    @Schema(description = "流水号")
    private String serialNo;

    /**
     * 车牌号
     */
    @Schema(description = "车牌号", example = "鄂AEE102")
    private String carPlateNo;

    /**
     * 车牌颜色
     */
    @Schema(description = "车牌颜色", example = "1")
    private String carPlateColor;

    /**
     * 卡证
     */
    @Schema(description = "卡证")
    private CardGroup cardGroup;

    /**
     * 会员
     */
    @Schema(description = "会员")
    private CardMember cardMember;
    // ====================================================================================
    //
    // ====================================================================================
    @Schema(description = "入场通道编号")
    private String inGateCode;
    @Schema(description = "出场通道编号")
    private String outGateCode;

    @Schema(description = "入场时间")
    private Long inTime;
    @Schema(description = "出场时间")
    private Long outTime;

    @Schema(description = "入场图片")
    private String inPhoto;
    @Schema(description = "出场图片")
    private String outPhoto;
    // ====================================================================================
    // 停车状态
    // ====================================================================================
    /**
     * 进出场类型标志 1-待入场 2 已入场 3-待离场 4 已离场
     */
    @Schema(description = "进出场类型标志 1-待入场 2 已入场 3-待离场 4 已离场", example = "1")
    private String inOutState;

    /**
     * 卡证类型标志 1-临停 3-白名单 4-黑名单 5-月卡
     */
    @Schema(description = "卡证类型标志 1-临停 2-访客车 3-白名单 4-黑名单 5-月卡", example = "1")
    private String cardClassify;

    /**
     * 通行类型标志 0-无限制 1-禁止通过 2-允许通过 3-弹框确认
     */
    @Schema(description = "通行类型标志 0-无限制 1-禁止通过 2-允许通过 3-弹框确认", example = "0")
    private String accessRuleType;

    /**
     * 缴费类型标志 0-未缴费 1-已缴费 2-已缴全 3-先离场后缴费
     */
    @Schema(description = "缴费类型标志 0-未缴费 1-已缴费 2-已缴全 3-先离场后缴费", example = "0")
    private String chargeType;

    /**
     * 人工减免类型标志 0-无减免 1-时长减免 2-金额减免
     */
    @Schema(description = "人工减免类型标志 0-无减免 1-时长减免 2-金额减免", example = "0")
    private String reducingType;

    /**
     * 异常类型 0-正常 1-免费放行-救护车 2-设备故障 3-未抬杆 4-车牌重复识别
     */
    @Schema(description = "异常类型 0-正常 1-免费放行-救护车 2-设备故障 3-未抬杆 4-车牌重复识别", example = "0")
    private String exceptionType;


    public String getDescription() {
        return "ParkingCar{" +
                "inOutState='" + InOutStateEnum.getEnumItemLabel(inOutState) + '\'' +
                ", cardClassify='" + CardClassifyEnum.getEnumItemLabel(cardClassify) + '\'' +
                ", accessRuleType='" + AccessRuleTypeEnum.getEnumItemLabel(accessRuleType) + '\'' +
                ", chargeType='" + ChargeTypeEnum.getEnumItemLabel(chargeType) + '\'' +
                ", reducingType='" + ReducingTypeEnum.getEnumItemLabel(reducingType) + '\'' +
                ", exceptionType='" + exceptionType + '\'' +
                '}';
    }

}
